<%@ Page Language="vb" AutoEventWireup="false" Codebehind="RetailPricing.aspx.vb" Inherits="MIMS_WRS.Web.RetailPricing"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<title>RetailPricing</title>
		<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
		<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
		<LINK rel="stylesheet" type="text/css" href="../startpage.css">
		<script language="javascript" src="../js/common.js"></script>
		<style>
		tooltipheader { BORDER-BOTTOM: #c4d5e3 1px solid; FILTER: alpha(opacity=85); BORDER-LEFT: #c4d5e3 1px solid; PADDING-BOTTOM: 5px; PADDING-LEFT: 5px; WIDTH: 400px; PADDING-RIGHT: 5px; FONT-FAMILY: tahoma, arial; BACKGROUND: #c4d5e3; FONT-SIZE: 10px; BORDER-TOP: #c4d5e3 1px solid; FONT-WEIGHT: bold; BORDER-RIGHT: #c4d5e3 1px solid; PADDING-TOP: 5px; opacity: 0.85; -moz-opacity: 0.85 }
		.tooltipbody { BORDER-BOTTOM: #c4d5e3 1px solid; FILTER: alpha(opacity=85); BORDER-LEFT: #c4d5e3 1px solid; PADDING-BOTTOM: 8px; PADDING-LEFT: 8px; WIDTH: 400px; PADDING-RIGHT: 8px; FONT-FAMILY: tahoma, arial; BACKGROUND: #fff; FONT-SIZE: 11px; BORDER-RIGHT: #c4d5e3 1px solid; PADDING-TOP: 8px; opacity: 0.85; -moz-opacity: 0.85 }
		.tooltiph1 { FONT-WEIGHT: bold; TEXT-DECORATION: underline }
		DIV#subHeader { PADDING-BOTTOM: 3px; BACKGROUND-COLOR: #64a2de; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; FONT-FAMILY: Tahoma, Arial, verdana; HEIGHT: 2%; COLOR: white; FONT-SIZE: 8pt; PADDING-TOP: 3px }
		DIV#header { BACKGROUND-COLOR: #eeeeee; HEIGHT: 5%; VERTICAL-ALIGN: top }
		DIV#header H1 { PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; FLOAT: left; COLOR: blue; FONT-SIZE: 1.2em; PADDING-TOP: 0px }
		DIV#header #navigation { PADDING-RIGHT: 0.3em; FLOAT: right; CLEAR: left; VERTICAL-ALIGN: top }
		#tblList TABLE { BACKGROUND-COLOR: whitesmoke; BORDER-COLLAPSE: collapse }
		#tblList TD { BORDER-LEFT: #ddd 0px solid; BORDER-TOP: black 0px solid; CURSOR: hand }
		#tblList TD { TEXT-ALIGN: left; PADDING-LEFT: 2px; PADDING-RIGHT: 2px; WHITE-SPACE: nowrap; FONT-SIZE: 11px }
		TH { TEXT-ALIGN: left; PADDING-LEFT: 2px; PADDING-RIGHT: 2px; WHITE-SPACE: nowrap; FONT-SIZE: 11px }
		#tblList TH { BORDER-BOTTOM: #222 0px solid; TEXT-ALIGN: center; BORDER-LEFT: #222 0px solid; BACKGROUND-COLOR: #cfd9e7; TEXT-OVERFLOW: ellipsis; DISPLAY: block; FONT-FAMILY: verdana, Arial, tahoma, sans-serif; COLOR: #3a4f6c; FONT-SIZE: 0.7em; OVERFLOW: hidden; FONT-WEIGHT: normal }
		#tblList TABLE TBODY TR TD DIV { TEXT-OVERFLOW: ellipsis; DISPLAY: block; OVERFLOW: hidden }
		.ItemRow { BACKGROUND: #f0f0f0 }
		.AlternateItemRow { BACKGROUND: #fafafa }
		.RowSelected { BACKGROUND-COLOR: #9b9b1c; COLOR: #fff }
		.CellWidth1 { WIDTH: 5% }
		.CellWidth11 { WIDTH: 6% }
		.CellWidth2 { WIDTH: 10% }
		.CellWidth3 { WIDTH: 18% }
		.CellWidth4 { WIDTH: 8% }
		.CellWidth5 { WIDTH: 12% }
		.CellWidth6 { WIDTH: 8% }
		.CellWidth7 { WIDTH: 11% }
		.CellWidth8 { WIDTH: 10% }
		.CellWidth9 { WIDTH: 8% }
		.CellWidth10 { WIDTH: 8% }
		.ReadOnlyTextbox { COLOR: #0000cc }
		.TextBoxNumber { TEXT-ALIGN: right; FONT-FAMILY: Arial, Helvetica, sans-serif; COLOR: #000000; FONT-SIZE: 11px }
		.txtnormal { FONT-FAMILY: Arial, Helvetica, sans-serif; COLOR: #000000; FONT-SIZE: 11px }
		DIV#outerDiv { TEXT-ALIGN: center; BACKGROUND-COLOR: white; WIDTH: 100%; HEIGHT: 100% }
		DIV#content { TEXT-ALIGN: left; BACKGROUND-COLOR: white; WIDTH: 740px; FONT-FAMILY: Tahoma, Arial; HEIGHT: 85%; MARGIN-LEFT: auto; FONT-SIZE: 8pt; MARGIN-RIGHT: auto }
		.mainRow { BACKGROUND-COLOR: whitesmoke }
		.CurrentSort { COLOR: green; FONT-WEIGHT: bold }
		</style>
		<script>
			function cboPO_onchanged() {
				var cboPOOrder = window.document.getElementById('cboPOOrder');
				var txtContainerType = window.document.getElementById('<%= txtContainerType.ClientID %>');
				if (cboPOOrder.selectedIndex >= 0) {
					var text = cboPOOrder.options[cboPOOrder.selectedIndex].value.substring(0,1);
					if(text == 'W')
						txtContainerType.value = 'Warehouse';
					if(text == 'D')
						txtContainerType.value = 'Direct FOB';
					if(text == 'H')
						txtContainerType.value = 'Direct HD';
				}
		}
		</script>
	</HEAD>
	<body onload="cboPO_onchanged" MS_POSITIONING="GridLayout">
		<form id="Form1" method="post" runat="server">
			<div id="outerDiv">
				<div id="header">
					<h1 style="PADDING-LEFT: 109px">Welcome to the Retail Price Calculator</h1>
					<div id="navigation">&nbsp;<A href="../SignIn.aspx?logout=1">Log out</A></div>
				</div>
				<DIV style="WIDTH: 1050px; HEIGHT: 85%" id="content">
					<table id="mainTable" border="0" width="100%">
						<TBODY>
							<tr>
								<td><asp:label id="lblMessage" EnableViewState="False" CssClass="ErrorMessage" Runat="server"></asp:label></td>
							</tr>
							<tr>
								<td>
									<table border="0" width="100%">
										<tr>
											<td width="40%">
												<table border="0" width="100%">
													<tr id="trLine9">
														<td><span>Customer :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><asp:textbox id="txtCustomer" runat="server" ReadOnly="True"></asp:textbox></td>
													</tr>
													<tr id="trLine91">
														<td><span>PO order No:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
																<asp:dropdownlist id="cboPOOrder" runat="server" onchange="cboPO_onchanged()" Width="155px"></asp:dropdownlist></span></td>
													</tr>
													<tr>
														<td><span>Container Type :&nbsp;</span><asp:textbox id="txtContainerType" runat="server" ReadOnly="True"></asp:textbox></td>
													</tr>
												</table>
											</td>
											<td width="60%">
												<table border="0" width="80%">
													<tr>
														<td width="56%"></td>
														<td width="16%"><span>Margin</span>
														</td>
														<td width="28%"><span>Mark-up</span>
														</td>
													</tr>
													<tr>
														<td><span>1. Start by selecting a overal Retail Margin or Mark-up</span>
														</td>
														<td><asp:textbox id="txtMarginInput" runat="server" CssClass="TextBoxNumber" columns="8" maxlength="10"></asp:textbox></td>
														<td><asp:textbox id="Textbox3" runat="server" CssClass="TextBoxNumber" columns="8" maxlength="10"></asp:textbox></td>
													</tr>
													<tr>
														<td><span>2. Enter Sales Tax (Vat) % (only if included on retail ticket price) </span>
														</td>
														<td></td>
														<td><asp:textbox id="Textbox4" runat="server" CssClass="TextBoxNumber" columns="8" maxlength="10"></asp:textbox></td>
													</tr>
													<tr>
														<td><span>3. Select group by&nbsp;click on check box and make all</span>
														</td>
														<td><asp:textbox id="txtMarginForGroup" runat="server" CssClass="TextBoxNumber" columns="8" maxlength="10"></asp:textbox></td>
														<td><asp:button id="btnGo" Runat="server" Width="82px" Text="GO"></asp:button></td>
													</tr>
													<tr>
														<td colSpan="3"><span>4. Suggestion: Consider sorting by Capacity to group same value 
																items and check by sorting by Dia then Height to check .</span>
														</td>
													</tr>
													<tr>
														<td style="PADDING-TOP: 10px" colSpan="3"><span>5. Individula cells can be edited</span>
														</td>
													</tr>
												</table>
											</td>
										</tr>
									</table>
									<b>Sort any * Column by clicking on column header</b></td>
							</tr>
							<tr id="trLine10" height="25">
								<td>Current Sort by:&nbsp;<asp:label id="lblSorting" runat="server" cssclass="CurrentSort" enableviewstate="False">Item</asp:label></td>
							</tr>
							<tr id="trLine12"> <!-- Shopping list -->
								<td>
									<div id="divOuter"><asp:datalist id="dlRetailPricingList" runat="server" gridlines="Both" cellpadding="1" width="100%"
											enableviewstate="true">
											<headertemplate>
												<table style="Z-INDEX: 0" id="tblList" border="1" width="100%">
													<thead>
														<tr height="30">
															<th style="WIDTH: 2.5%;HEIGHT: 26px">
															</th>
															<th style="HEIGHT: 26px" class="CellWidth8">
																Picture</th>
															<th style="HEIGHT: 26px" class="CellWidth1">
																<a href="RetailPricing.aspx#this" onserverclick="SortItemField" runat="server" ID="linkItem">
																	Item</a>*
															</th>
															<th style="HEIGHT: 26px" class="CellWidth11">
																Order
																<br />
																Qty</th>
															<th style="WIDTH: 3.5%; HEIGHT: 26px" class="CellWidth2">
																<a href="RetailPricing.aspx#this" onserverclick="SortProductCodeField" runat="server"
																	ID="linkProdCode">
																	<P>Product
																	</P>
																	Code</a>*
															</th>
															<th style="HEIGHT: 26px" class="CellWidth4">
																<a href="RetailPricing.aspx#this" onserverclick="SortDescriptionField" runat="server"
																	ID="A1">Description</a>*
															</th>
															<th style="HEIGHT: 26px" class="CellWidth4">
																Sell Unit</th>
															<th style="HEIGHT: 26px" class="CellWidth4">
																<a href="RetailPricing.aspx#this" onserverclick="SortDiaLenField" runat="server" ID="A2">
																	Dia (Len)</a>*</th>
															<th style="HEIGHT: 26px" class="CellWidth5">
																<a href="RetailPricing.aspx#this" onserverclick="SortWidthField" runat="server" ID="A3">
																	Width</a>*
															</th>
															<th style="HEIGHT: 26px" class="CellWidth5">
																<a href="RetailPricing.aspx#this" onserverclick="SortHeightField" runat="server" ID="A4">
																	Height</a>*</th>
															<th style="HEIGHT: 26px" class="CellWidth6">
																<a href="RetailPricing.aspx#this" onserverclick="SortCapacityField" runat="server"
																	ID="A5">
																	<P>Capacity
																	</P>
																	(LxWxH) </a>*
															</th>
															<th style="HEIGHT: 26px" class="CellWidth7">
																<a href="RetailPricing.aspx#this" onserverclick="SortCostPriceField" runat="server"
																	ID="A6">Cost Price</a>*
															</th>
															<th style="HEIGHT: 26px" style="WIDTH: 12%;">
																<a href="RetailPricing.aspx#this" onserverclick="SortrRetailPriceField" runat="server"
																	ID="A7">Retail <br>Price</a>*</th>
															<th style="HEIGHT: 26px" class="CellWidth8">
																Margin</th>
															<th style="HEIGHT: 26px" class="CellWidth10">
																Margin %</th>
															<th style="HEIGHT: 26px" class="CellWidth10">
																Mark-up</th>
															<th style="HEIGHT: 26px" class="CellWidth10">
																Total Cost</th>
															<th style="HEIGHT: 26px" class="CellWidth10">
																Total Selling
															</th>
															<th style="WIDTH: 2.5%; HEIGHT: 26px" class="CellWidth10">
																Total
																<br>
																 &nbsp;Margin&nbsp;&nbsp;
															</th>
															<th style="WIDTH: 1.5%; HEIGHT: 26px" class="CellWidth10">
																Barcode
																<br>
																UPC or Ean<br>
																(123456)
															</th>
														</tr>
													</thead>
													<tbody>
											</headertemplate>
											<Itemtemplate>
												<tr class="mainRow">
													<td>
														<asp:CheckBox ID="chkSelect" Runat="server"></asp:CheckBox>
													</td>
													<td class="CellWidth1" align="right"></td>
													<td class="CellWidth1" align="right"><asp:textbox id="txtItem" onkeypress="NumberOnly(0)" CssClass="TextBoxNumber" Runat="server"
															Width="98%"></asp:textbox></td>
													<td class="CellWidth11" align="right"><asp:textbox id="txtOrderQty" maxlength="5" columns="5" onkeypress="NumberOnly(0)" CssClass="TextBoxNumber" Runat="server"
															Width="98%"></asp:textbox></td>
													<td style="WIDTH: 3.5%" class="CellWidth2"><asp:textbox id="txtProductCode" maxlength="10" columns="10" CssClass="TextBoxNumber" Runat="server"
															Width="64px"></asp:textbox></td>
													<td class="CellWidth4"><asp:textbox id="txtDesc"  CssClass="TextBoxNumber" Runat="server"
															Width="98%"></asp:textbox></td>
													<td class="CellWidth4" align="center"><asp:textbox id="txtSellUnit" CssClass="TextBoxNumber" Runat="server"
															Width="98%"></asp:textbox></td>
													<td class="CellWidth5"><asp:textbox id="txtDia" onkeypress="NumberOnly(1)" maxlength="5" columns="5" CssClass="TextBoxNumber" Runat="server" Width="90%"></asp:textbox></td>
													<td><asp:textbox id="txtWidth" onkeypress="NumberOnly(1)" CssClass="TextBoxNumber" Runat="server" maxlength="5" columns="5"
															Width="98%"></asp:textbox></td>
													<td style="TEXT-ALIGN: right" class="CellWidth5"><asp:textbox id="txtHeight" onkeypress="NumberOnly(1)" maxlength="5" columns="5" CssClass="TextBoxNumber" Runat="server"
															Width="98%"></asp:textbox></td>
													<td class="CellWidth6"><asp:textbox id="txtCapacity" onkeypress="NumberOnly(1)" CssClass="TextBoxNumber" Runat="server" maxlength="7" columns="7"
															Width="98%"></asp:textbox>
													<td class="CellWidth7" align="right"><asp:textbox id="txtCostPrice" onkeypress="NumberOnly(1)" maxlength="8" columns="8" CssClass="TextBoxNumber" Runat="server"
															Width="98%"></asp:textbox></td>
													<td class="CellWidth8" align="center"><asp:textbox id="txtRetailPrice" onkeypress="NumberOnly(1)" maxlength="8" columns="8" CssClass="TextBoxNumber" Runat="server"
															Width="98%"></asp:textbox></td>
													<td class="CellWidth9" align="center"><asp:textbox id="txtMargin" onkeypress="NumberOnly(1)" maxlength="6" columns="6" CssClass="TextBoxNumber" Runat="server"
															Width="98%"></asp:textbox></td>
													<td class="CellWidth10" align="center"><asp:textbox id="txtMarginPercent" onkeypress="NumberOnly(1)" maxlength="5" columns="5"  CssClass="TextBoxNumber" Runat="server"
															Width="98%"></asp:textbox></td>
													<td class="CellWidth10"><asp:textbox id="txtMarkup" onkeypress="NumberOnly(1)" maxlength="4" columns="4" CssClass="TextBoxNumber" Runat="server"
															Width="98%"></asp:textbox></td>
													<td class="CellWidth10"><asp:textbox id="txtTotalCost" onkeypress="NumberOnly(1)" maxlength="9" columns="9" CssClass="TextBoxNumber" Runat="server"
															Width="98%"></asp:textbox></td>
													<td class="CellWidth10"><asp:textbox id="txtTotalSelling" onkeypress="NumberOnly(1)" maxlength="9" columns="9" CssClass="TextBoxNumber" Runat="server"
															Width="98%"></asp:textbox></td>
													<td style="WIDTH:70%" class="CellWidth10"><asp:textbox id="txtTotalMargin" onkeypress="NumberOnly(1)" maxlength="8" columns="8"  CssClass="TextBoxNumber" Runat="server"
															Width="98%"></asp:textbox></td>
													<td class="CellWidth10"><asp:textbox id="txtBarCode" onkeypress="NumberOnly(0)"  columns="8"  CssClass="TextBoxNumber" Runat="server"
															Width="98%"></asp:textbox></td>
												</tr>
											</Itemtemplate>
											<footertemplate>
												<tr>
													<td vAlign="bottom" colSpan="3"><b>Total/Average: </b>
													</td>
													<td class="CellWidth1"><asp:textbox id="txtTotalQty" onkeypress="NumberOnly(0)" CssClass="TextBoxNumber" Runat="server"
															Width="90%"></asp:textbox></td>
													<td style="WIDTH: 2.04%" class="CellWidth11"></td>
													<td></td>
													<td></td>
													<td></td>
													<td></td>
													<td></td>
													<td class="CellWidth5"></td>
													<td class="CellWidth6"><asp:textbox id="txtSumCostPrice" onkeypress="NumberOnly(0)" CssClass="TextBoxNumber" Runat="server"
															Width="90%"></asp:textbox>
													<td class="CellWidth7"><asp:textbox id="txtSumRetailPrice" onkeypress="NumberOnly(0)" CssClass="TextBoxNumber" Runat="server"
															Width="90%"></asp:textbox></td>
													<td class="CellWidth8"><asp:textbox id="txtSumMargin" onkeypress="NumberOnly(0)" CssClass="TextBoxNumber" Runat="server"
															Width="90%"></asp:textbox></td>
													<td class="CellWidth9"><asp:textbox id="txtAvgMarginPert" onkeypress="NumberOnly(0)" CssClass="TextBoxNumber" Runat="server"
															Width="90%"></asp:textbox></td>
													<td class="CellWidth10"><asp:textbox id="txtAvgMakeup" onkeypress="NumberOnly(0)" CssClass="TextBoxNumber" Runat="server"
															Width="90%"></asp:textbox></td>
													<td class="CellWidth10"><asp:textbox id="txtSumTotalCost" onkeypress="NumberOnly(0)" CssClass="TextBoxNumber" Runat="server"
															Width="90%"></asp:textbox></td>
													<td class="CellWidth10"><asp:textbox id="txtSumTotalSelling" onkeypress="NumberOnly(0)" CssClass="TextBoxNumber" Runat="server"
															Width="90%"></asp:textbox></td>
													<td style="WIDTH: 10.9%" class="CellWidth10"><asp:textbox id="txtSumTotalMargin" onkeypress="NumberOnly(0)" CssClass="TextBoxNumber" Runat="server"
															Width="90%"></asp:textbox></td>
													<td style="TEXT-ALIGN: right" class="CellWidth10"><asp:button id="btnRecalculated" OnClick="RecalculatedButton_Click" Runat="server" Text="Recalculated" Width="88px"></asp:button></td>
												</tr>
						</TBODY>
					</table>
					</footertemplate> </asp:datalist></DIV>
				</TD></TR>
				<tr>
					<td>
						<table id="tblList1" border="1" width="100%">
						</table>
					</td>
				</tr>
				<tr>
					<td>
						<table border="0" cellSpacing="0" cellPadding="0" width="87%">
							<tr>
								<TD><asp:button id="btnSubmit" Runat="server" Text="Submit" width="100px"></asp:button></TD>
							</tr>
						</table>
					</td>
				</tr>
				</TBODY></TABLE><input id="hidSortBy" value="RL_Id" type="hidden" name="hidSortBy" runat="server"><input id="hidMeasUnit" value="cbm" type="hidden" name="hidMeasUnit" runat="server">
				<input id="hidRoadWeight" value="1" type="hidden" name="hidRoadWeight" runat="server">
				<input id="hid20C" value="30" type="hidden" name="hid20C" runat="server"> <input id="hid40C" value="60" type="hidden" name="hi40C" runat="server">
				<input id="hid40HC" value="70" type="hidden" name="hi40HC" runat="server">
			</div>
			</DIV></form>
	</body>
</HTML>
